Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-developer is "save-a-scenario">

It allows to save a scenario on My Personal Data.

Inputs

A JSON with these parameters:
scenarioName string
The name of the scenario you want to save
scenarioDescription string
The description of the scenario you want to sav
scenarioDatetimeStart string
Scenario start date
scenarioDatetimeEnd string
Scenario end date
isPublic boolean
If the scenario is to be public
features array of GeoJSON
Indicates where the scenario occurs
An example of the JSON filled with correct data:

{
    "features": [
        {
        "type": "Feature",
        "properties": {},
        "geometry": {
            "type": "Polygon",
            "coordinates": [
            [
                [
                10.766762,
                43.923048
                ],
                [
                11.553237,
                43.967992
                ],
                [
                11.373472,
                43.778998
                ],
                [
                10.766762,
                43.923048
                ]
            ]
            ]
        }
        },
        {
        "type": "Feature",
        "properties": {},
        "geometry": {
            "type": "Polygon",
            "coordinates": [
            [
                [
                10.956515,
                43.658812
                ],
                [
                10.956515,
                43.815043
                ],
                [
                10.964005,
                43.815043
                ],
                [
                10.964005,
                43.658812
                ],
                [
                10.956515,
                43.658812
                ]
            ]
            ]
        }
        }
    ],
    "scenarioName": "PROVA",
    "scenarioDescription": "DESCRIZIONE PROVA",
    "scenarioDatetimeStart": "2021-01-22T09:45",
    "scenarioDatetimeEnd": "2021-01-31T09:45",
    "isPublic": false
}

Outputs

Returns the value entered with its metadata

Details

The node can receive a JSON with the parameters described in the Inputs section and with them generate the output JSON. If the values are not present in the input JSON, these are read by those in the configuration. If they are not present in either part, an error is generated for the necessary parameters.